﻿namespace SQLPXBase.Factory.Keys
{
    public abstract class PrimaryKey
    {
        public abstract bool IsEmpty { get; }
        public abstract PrimaryKey DefaultValue { get; }
    }

    public class LongPK : PrimaryKey
    {
        private long id;

        public LongPK()
        {
            id = -1;
        }

        public LongPK(long id):this()
        {
            this.id = id;
        }

        public override bool IsEmpty
        {
            get { return id < 0; }
        }

        public override PrimaryKey DefaultValue
        {
            get { return new LongPK(); }
        }
    }
}
